package com.bruce.tool.push.jpush.entity;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.NoArgsConstructor;

/**
 * @author Bruce(刘正航)
 * "message"
 */
@NoArgsConstructor(staticName = "create")
public class JpushMessage {
    @Getter
    @JsonProperty("msg_content")
    private String msgContent;
    @Getter
    @JsonProperty("content_type")
    private String contentType;
    @Getter
    private String title;
    @Getter
    private Extras extras;

    public JpushMessage msgContent(String msgContent){
        this.msgContent = msgContent;
        return this;
    }

    public JpushMessage contentType(String contentType){
        this.contentType = contentType;
        return this;
    }

    public JpushMessage title(String title){
        this.title = title;
        return this;
    }

    public JpushMessage extras(Extras extras){
        this.extras = extras;
        return this;
    }

    @NoArgsConstructor(access = AccessLevel.PRIVATE)
    public static class Extras {
        @Getter
        private String key;
        public Extras key(String key){
            this.key = key;
            return this;
        }
    }

}
